package com.rysm.wjsm.demo2;
/*
有100份礼品,两人同时发送，当剩下的礼品小于10份的时候则不再送出，利用多线程模拟该过程并将线程的名称打印出来.
 */
public class Demo2 {
    public static void main(String[] args) {
        MyRunnable mr = new MyRunnable();
        Thread t = new Thread(mr);
        Thread t1 = new Thread(mr);
        t.setName("一号");
        t1.setName("二号");
        t.start();
        t1.start();
    }
}
